
 <script>
 changeWaiting(0); 
 //calendar 1 va 2
var cusfrmdailyreport_cal1 = CreateCalObject('cusfrmdailyreport_fromdate', 'cusfrmdailyreport_imgCal1');
var cusfrmdailyreport_cal2 = CreateCalObject('cusfrmdailyreport_todate', 'cusfrmdailyreport_imgCal2');

function cusfrmdailyreport_createReport(){
     reporttype = $("input[name='cusfrmdailyreport_reporttype']:checked").val();
     
     var service = '';
         $('INPUT[name=cusfrmdailyreport_chkservice]').each(function(){
            if($(this).attr('checked')){
              service+=','+$(this).val();  
            }
        });
     fromdate = $('#cusfrmdailyreport_fromdate').val();
     todate = $('#cusfrmdailyreport_todate').val();
     var params = new Array();
     params['reporttype']=reporttype;
     params['fromdate']=fromdate;
     params['todate']=todate;
     params['service']=service;
     
     changeWaiting(0);
     xajax_cusfrmdailyreport_load(params);  
}

$('#cusfrmdailyreport_fromdate').val(GetStartDay()) ; // ngay bat dau
$('#cusfrmdailyreport_todate').val(GetToday()) ;       // ngay gio ket thuc

function cusfrmdailyreport_openDetail(generate_id,timebegin,timeend,roomname){
  $('#cusfrmdailyreport_productDetail').dialog('option', 'title', 'Chi tiết sản phẩm phòng '+roomname+' từ '+ timebegin +' đến' + timeend);
  xajax_cusfrmdailyreport_productDetail(generate_id);
}

$(document).ready(function () {
$('#cusfrmdailyreport_productDetail').dialog({
        autoOpen: false,
        modal: false,
        width: 400,
        resizable: true,
        overflow: 'auto' 
    });
});
changeWaiting(0);        // khoa man hinh
initDivleft();      // chinh design
 xajax_cusfrmdailyreport_load();  // load du lieu ban dau
 xajax_cusfrmdailyreport_loadservice();
 </script>

<body>
<div id="cusfrmdailyreport_productDetail">
</div>
<div class="divmain">
<table width="100%" id="cusfrmdailyreport_tblinfo" class="tblInfo">
<tr>
<td valign="top" class="width25">
<div class="divLeft">
<table class="info" id="cusfrmdailyreport_tblcondition">
<tr >
<td  class="width100 clssearch" id="cusfrmdailyreport_tdcondsearch">


<table class="width100"> 
<tr><td>thoi gian</td><td><input type="text" value="" class="datereport"  id="cusfrmdailyreport_fromdate"/><a href="javascript:cusfrmdailyreport_cal1.popup();"><img src="adagps.com/images/cal/cal2.png" id="cusfrmdailyreport_imgCal1"  class="datepicker" ></a>-<input type="text" value="" class="datereport"  id="cusfrmdailyreport_todate" /><a href="javascript:cusfrmdailyreport_cal2.popup();"><img src="adagps.com/images/cal/cal2.png" id="cusfrmdailyreport_imgCal2" alt="Nhấn vào đây để ch�?n ngày"  class="datepicker" ></a>        </td></tr>
<tr><td rowspan="4">Loai bao cao</td><td><input type="radio" checked="checked" name="cusfrmdailyreport_reporttype" id="cusfrmdailyreport_reporttype_1" value="1">Theo ngày</input> </td></tr>
<tr><td colspan="2"><input type="radio"  name="cusfrmdailyreport_reporttype" id="cusfrmdailyreport_reporttype_2" value="2">Theo tuan</input></td></tr>
<tr><td colspan="2"><input type="radio" name="cusfrmdailyreport_reporttype" id="cusfrmdailyreport_reporttype_3" value="3">Theo thang</input></td></tr>
<tr><td colspan="2"><input type="radio" name="cusfrmdailyreport_reporttype" id="cusfrmdailyreport_reporttype_4" value="4">Theo nguoi thu</input></td></tr>


<tr><td>Dich vu</td><td id="cusfrmdailyreport_tdservice">      </td></tr> 
</table>



</td>
</tr>
<tr>
<td>

<button id="cusfrmdailyreport_create" class="search" onclick="cusfrmdailyreport_createReport();" type="button"> Xem </button>
</td>
</tr>
</table>
</div>
</td>
<td class="clsmiddle"></td>


<td width="80%" height="400" valign="top">
<div class="divGrid" id="cusfrmdailyreport_divGrid">

</div></td>
<td class="clsend"></td>
</tr>
</table>
</div>

</body>

